#quiz-container {
    position: relative;
    width: 90vw;
    height: calc(100vh - 60px); /* 减去顶部菜单栏高度 */
    max-width: 800px;
    max-height: calc(100vh - 80px);
    margin: 20px auto; /* 增加顶部间距 */
    padding: 30px;
    border-radius: 24px;
    background-color: #f8f9fa;
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
    overflow: hidden; /* 防止子元素溢出 */
}

/* 调整绝对定位元素的基准 */
#word-display {
    position: absolute;
    top: 33%;
    left: 10%;
}

/* 图片样式 */
.word-image {
    position: absolute;
    top: 33%; /* 与题面垂直对齐 */
    transform: translateY(-50%);
    right: 10%; /* 右侧对齐 */
    width: 150px;
    height: 150px;
    object-fit: contain;
}

.answer-grid {
    position: absolute;
    bottom: 10%;
    left: 50%;
    transform: translateX(-50%);
    max-width: 600px;
    width: 90%; /* 新增容器宽度百分比 */
    height: 40vh; /* 新增容器高度 */
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 1fr; /* 确保行高自适应 */
    gap: 15px;
    justify-items: center;
}

.answer-btn {
    width: 90%; /* 基于grid单元格宽度 */
    height: 80%; /* 基于grid单元格高度 */
    padding: 5%;
    font-size: clamp(1rem, 2vw, 18px); /* 响应式字体 */
    box-sizing: border-box; /* 包含padding */
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 3/1; /* 可选宽高比 */
}

/* 新增正确/错误选项样式 */
.answer-btn.correct {
    background-color: #d4edda;
    color: #155724;
    border: 2px solid #c3e6cb;
    transform: scale(1.05);
}

.answer-btn.incorrect {
    background-color: #f8d7da;
    color: #721c24;
    border: 2px solid #f5c6cb;
    transform: scale(1.05);
}

/* 新增选项图片样式 */
.option-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* 音频按钮样式 */
.sound-btn {
    background-color: #f0f0f0;
    border: none;
    font-size: 1.2em;
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.sound-btn:hover {
    background-color: #e0e0e0;
}

/* 下一题按钮 */
.next-button {
    position: absolute;
    right: 30px;  /* 与容器内边距对齐 */
    bottom: 30px;
    transform: none;  /* 移除原有水平居中 */
}

/* 调整反馈信息位置 */
.feedback {
    position: absolute;
    top: 45%;
    transform: translateY(-50%);
    left: 10%;
    min-width: 120px;
    text-align: center;
}

/* 在全局样式中添加 */
.layout-content {
    display: flex;
    justify-content: center;
    padding-top: 20px;
    min-height: calc(100vh - 60px);
}

/* 新增自定义弹窗样式 */
.custom-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 9999;
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 25px;
    border-radius: 8px;
    min-width: 300px;
    text-align: center;
}

.modal-message {
    margin: 15px 0;
    font-size: 16px;
}

.modal-footer {
    margin-top: 20px;
    display: flex;
    gap: 15px;
    justify-content: center;
}

.modal-btn {
    min-width: 80px;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
}
